package com.hsm7;

import com.hsm4.Test;

import java.util.ArrayList;

public class TestGeneric<T> {
    private T t;
    public void set(T t){
        this.t =t;
    }
    public T get(){
        return t;
    }

    public static void main(String[] args) {

    }
    public void no(){
        TestGeneric tg = new TestGeneric();
        tg.set("String");
        String t1 = (String)tg.get();
        System.out.println(t1);
    }
    public void yes(){
        TestGeneric<String> tg2 = new TestGeneric<>();
        tg2.set("String");
        System.out.println(tg2.get());
    }

}
